<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Demo5</title>
    <script src="jquery.min.js"></script>
</head>
<div id="test"></div>
<div id="test2"></div>
<input type="text" value="">
<script>
    $(document).ready(function(){
        $("#test").html('<h1>设置html</h1>');
        $("#test2").text('<h1>设置text</h1>');
        $("input").val("设置内容");
    });
</script>
<div id="test"><span>你好</span></div>
<input type="text" value="hello">
<script>
    $(document).ready(function(){
        var html = $("#test").html();
        console.log("html内容为"+html);

        var text = $("#test").text();
        console.log("文本内容为"+text);

        var inputVal = $("input").val();
        console.log(inputVal);
    });
</script> -->
<!-- <body>
    <button type="button">点我消失</button>
    <script>
        $(document).ready(function(){
            $('button').click(function(){
                $(this).hide();
            });
        });
    </script>
</body> -->
</html>